package com.kyd.base.exception;


import com.kyd.base.response.RetCode;

/**
 * KydException
 *
 * @author kejw on 2018/7/5
 */
public class KydException extends RuntimeException {
	private static final long serialVersionUID = -215667272613755288L;

//	protected int code = RetCode.FAIL.value();
	private RetCode code = RetCode.FAIL;

	public KydException(){
	}

	public KydException(RetCode code) {
		this.code = code;
	}

	public KydException(String message) {
		super(message);
	}

	public KydException(RetCode code, String message) {
		super(message);
		this.code = code;
	}

	public KydException(Throwable cause) {
		super(cause);
	}

	public KydException(RetCode code, Throwable cause) {
		super(cause);
		this.code = code;
	}

	public KydException(String message, Throwable cause) {
		super(message, cause);
	}

	public KydException(RetCode code, String message, Throwable cause) {
		super(message, cause);
		this.code = code;
	}

	public RetCode getCode() {
		return code;
	}
}
